<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网格布局</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            margin: 0 auto;
            display: grid;
            width: 600px;
            height: 300px;
            grid-template-rows: repeat(3,100px);
            grid-template-columns: repeat(6,1fr);
            grid-template-areas: "a a a a b b"
                                 "a a a a f f"
                                 "c c d e f f";
            border: 2px solid gainsboro;
            grid-row-gap: 3px;
            column-gap: 3px;
            margin-top: 50px;
        }
        .box div:nth-child(1){
            grid-area: a;
            background-color: bisque;
        }
        .box div:nth-child(2){
            grid-area: b;
            background: rgb(252, 212, 212);
        }
        .box div:nth-child(3){
            grid-area: c;
            background: rgb(234, 147, 147);
        }
        .box div:nth-child(4){
            grid-area: d;
            background: rgb(218, 177, 177);
        }
        .box div:nth-child(5){
            grid-area: e;
            background: rgb(110, 73, 73);
        }
        .box div:nth-child(6){
            grid-area: f;
            background: rgb(71, 51, 51);
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
    </div>
</body>
</html>